namespace SV_INCORRECT_RESOURCE_HANDLING_WRONG_STATUS {
#include <stdio.h>
#include <mqueue.h>

void message_unchecked(const char* name, const char* data1, const char* data2)
{
	char c;
	mqd_t h;
	if ((h = mq_open(name, O_RDWR)) != (mqd_t)-1)
	{
		mq_receive(h, &c, 1, NULL);
		if (c == '1')
			mq_send(h, data1, strlen(data1) + 1, 2);
		else
			if (c == '2')
				mq_send(h, data2, strlen(data2) + 1, 2);
	}
	else
	{
		fprintf(stderr, "'mq_open' failed for %s\n", name);
	}
	mq_close(h); // Handler status might be wrong here.
}


#include <stdio.h>
#include <mqueue.h>

void message_unchecked(const char* name, const char* data1, const char* data2)
{
	char c;
	mqd_t h;
	if ((h = mq_open(name, O_RDWR)) != (mqd_t)-1)
	{
		mq_receive(h, &c, 1, NULL);
		if (c == '1')
			mq_send(h, data1, strlen(data1) + 1, 2);
		else
			if (c == '2')
				mq_send(h, data2, strlen(data2) + 1, 2);
		mq_close(h);
	}
	else
	{
		fprintf(stderr, "'mq_open' failed for %s\n", name);
	}
}
}}